<extend name="Public/layout"/>

<block name="body">
    <div class="title">
        <h2>{$meta_title}</h2>
    </div>
    <duv class="row">
        <form action="__SELF__" method="post" class="form">
            <div class="form-group">
                <label class="item-label">配置分组<span class="check-tips">（配置所属的分组）</span></label>
                <div class="controls">
                    <select name="group" class="form-control">
                        <volist name="config_groups" id="config_group">
                            <option value="{$key}" 
                                <php>if($info['group'] == $key) echo 'selected="selected"';</php> >
                                {$config_group}
                            </option>
                        </volist>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="item-label">配置类型<span class="check-tips">（配置类型）</span></label>
                <div class="controls">
                    <select name="type" class="form-control">
                        <volist name="config_types" id="config_type">
                            <option value="{$key}" 
                                <php>if($info['type'] == $key) echo 'selected="selected"';</php> >
                                {$config_type}
                            </option>
                        </volist>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="item-label">配置名称<span class="check-tips">（配置名称）</span></label>
                <div class="controls">
                    <input type="text" class="form-control" name="name" value="{$info.name|default=''}">
                </div>
            </div>
            <div class="form-group">
                <label class="item-label">配置标题<span class="check-tips">（配置标题）</span></label>
                <div class="controls">
                    <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
                </div>
            </div>
            <div class="form-group">
                <label class="item-label">配置值<span class="check-tips">（配置值）</span></label>
                <div class="controls">
                    <textarea class="form-control" name="value">{$info.value|default=''}</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="item-label">配置项<span class="check-tips">（如果是枚举型 需要配置该项）</span></label>
                <div class="controls">
                    <textarea class="form-control" name="extra">{$info.extra|default=''}</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="item-label">配置说明<span class="check-tips">（配置说明）</span></label>
                <div class="controls">
                    <textarea class="form-control" name="remark">{$info.remark|default=''}</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="item-label">排序<span class="check-tips">（用于分组显示的顺序）</span></label>
                <div class="controls">
                    <input type="text" class="form-control" name="sort" value="{$info.sort|default=0}">
                </div>
            </div>
            <div class="form-group">
                <input type="hidden" name="id" value="{$info.id|default=''}">
                <button class="btn btn-primary submit ajax-post" type="submit" target-form="form">确 定</button>
                <button class="btn return" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
        </form>
    </div>
</block>
